export function toLocaleStringSupports() {
  return toLocaleStringSupportsLocales() && toLocaleStringSupportsOptions()
}

function toLocaleStringSupportsLocales() {
  var number = 0
  try {
    number.toLocaleString('i')
  } catch (e) {
    return e.name === 'RangeError'
  }
  return false
}

function toLocaleStringSupportsOptions() {
  return !!(typeof Intl == 'object' && Intl && typeof Intl.NumberFormat == 'function')
}
